﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace DAO
{
    public class TuDienDAO
    {
        public List<TuDien > TimKiemTuDien(string key)
        {
            List<TuDien> _lstKetqua = new List<TuDien>();
            for (int i = 0; i < MyDatabase._lstTuDien.Count; i++)
            {
                TuDien temp = MyDatabase._lstTuDien[i];
                if (temp.VnWord.Contains(key))
                {
                    _lstKetqua.Add(temp);
                }
            }
            return _lstKetqua;
        }
       
        public List<TuDien> TimKiemTuDien(string key, int Type)
        {
            List<TuDien> _lstKetqua = new List<TuDien>();
            for (int i = 0; i < MyDatabase._lstTuDien.Count; i++)
            {
                TuDien temp = MyDatabase._lstTuDien[i];
                if (temp.VnWord.Contains(key) && Type == temp.IType)
                {
                    _lstKetqua.Add(temp);
                }
            }
            return _lstKetqua;
        }
    }
}
